<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>手机商城</title>
<!-- CSS -->
<!--<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">-->
<link rel="stylesheet" href="{url:#css/materialize.min.css}" />
<link rel="stylesheet" href="{url:#css/flexslider.css}" type="text/css">
<link rel="stylesheet" href="{url:#css/me.css}" />
<link rel="stylesheet" href="{url:#css/iconfont.css}" />
<!-- JS -->
<script src="{url:#js/jquery-1.11.3.min.js}"></script>
<script src="{url:#js/materialize.min.js}"></script>
<script src="{url:#js/json/json2.js}"></script>
<script src="{url:#js/home/home_classify.js}"></script>
<script>
	
</script>
</head>
<body>
<!-- TitleBar 开始 -->
<div class="navbar-fixed custom-navbar">
  <nav>
    <div class="nav-wrapper red accent-4 valign-wrapper custom-navbar">
      <ul class="left">
        <li><a ><i class="iconfont">&#xe661;</i></a></li>
      </ul>
      <span class="title-bar-size center_align">商城分类</span>
      <ul class="right">
        <li><a ><i class="material-icons">search</i></a></li>
      </ul>
    </div>
  </nav>
</div>
<!-- TitleBar 结束 -->
<div class="row">
	<!-- 左侧一级分类 -->
	<div class="col s3 classify_left_menu">
		<ul id="first_category">
			{list:items=$first_level_goods_category key=$i}
			{if:$cid==0}
				{if:$i==0}
					<li class="classify_item now_item" id="{$item['id']}">{$item['name']}</li>
				{else:}
					<li class="classify_item" id="{$item['id']}">{$item['name']}</li>
				{/if}
				
			{else:}
				{if:$cid==$item['id']}
					<li class="classify_item now_item" id="{$item['id']}">{$item['name']}</li>
				{else:}
					<li class="classify_item" id="{$item['id']}">{$item['name']}</li>
				{/if}
			{/if}
			{/list}
			<!-- 
			<li class="classify_item now_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			<li class="classify_item">一级分类</li>
			-->
		</ul>
	</div>
	<!-- 右侧分类列表 -->
	<div class="col s9 offset-s3 classify_right">
		<!-- 二级分类组 -->
		{list:items=$second_level_goods_category}
		<div class="classify-right-group">
			<div class="group-title" style="font-size:20px;" onclick="document.location.href='{url:/mobile/category_products/cid/$item[id]}'">{$item['name']}</div>
			
			<!-- 具体的三级分类 -->
			
			<div class="row">
				{list:items=$item['t_cid_list'] item=$it key=$i}
					{if:$i<=2}
					<div class="col s4 go-pro-list" onclick="document.location.href='{url:/mobile/category_products/cid/$it[id]}'">
						<img class="responsive-img" src="{$it['img']}" width="65" height="65" />
						<div class="center"><span class="classify-right-name">{$it['name']}</span></div>
					</div>
					{/if}
				{/list}
				<!-- 
				<div class="col s4 go-pro-list" url="classify_products.html">
					<img class="responsive-img" src="images/temp/classify_four.png" width="65" height="65" />
					<div class="center"><span class="classify-right-name">三级分类</span></div>
				</div>
				<div class="col s4 go-pro-list" url="classify_products.html">
					<img class="responsive-img" src="images/temp/classify_four.png" width="65" height="65" />
					<div class="center"><span class="classify-right-name">三级分类</span></div>
				</div>
				-->
			</div>
			{set:$c=count($item['t_cid_list'])}
			{if:$c>3} 
			<div class="row">
				{list:items=$item['t_cid_list'] item=$it key=$k}
					{if:$k>2}
					<div class="col s4 go-pro-list" onclick="document.location.href='{url:/mobile/category_products/cid/$it[id]}'">
						<img class="responsive-img" src="{$it['img']}" width="65" height="65" />
						<div class="center"><span class="classify-right-name">{$it['name']}</span></div>
					</div>
					{/if}
				{/list}
			</div>
			{/if}
			
			<!-- 
			<div class="row">
				<div class="col s4 go-pro-list" url="classify_products.html">
					<img class="responsive-img" src="images/temp/classify_four.png" width="65" height="65" />
					<div class="center"><span class="classify-right-name">三级分类</span></div>
				</div>
				<div class="col s4 go-pro-list" url="classify_products.html">
					<img class="responsive-img" src="images/temp/classify_four.png" width="65" height="65" />
					<div class="center"><span class="classify-right-name">三级分类</span></div>
				</div>
				<div class="col s4 go-pro-list" url="classify_products.html">
					<img class="responsive-img" src="images/temp/classify_four.png" width="65" height="65" />
					<div class="center"><span class="classify-right-name">三级分类</span></div>
				</div>
			</div>
			-->
		</div>
		{/list}
		
		
	</div>
</div>

<script type="text/javascript">
$(function(){
	$("#first_category li").each(function(){
		$(this).click(function(){
			$(this).attr("class", "classify_item now_item");
			$(this).parent().children().not($(this)).attr("class", 'classify_item');
			var cid = $(this).attr("id");
			
			document.location.href="{url:/mobile/goods_category}&id="+cid;

			
		});
	});
});
</script>


</body>
</html>
